/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import java.util.List;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;

/**
 *
 * @author cloud
 */
@WebService(serviceName = "BibliotecaWS")
@Stateless()
public class BibliotecaWS {

    /**
     * This is a sample web service operation
     */
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "DatabaseOp")
    public String DatabaseOp() {
        Biblioteca b = new Biblioteca();
        b.accessDB();
        
        return null;
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "DatabaseOpAdvanced")
    public List<String> operation() {
        Biblioteca b = new Biblioteca();
        List<String> users = b.accessDB();
        
        return users;
    }
}
